<!DOCTYPE html>
<html>
<head>
	<title>Fittable Examples</title>
	<!-- -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<!-- -->
	<script src="../../../../enyo/enyo.js" type="text/javascript"></script>
	<script src="../../../../lib/layout/package.js" type="text/javascript"></script>
	<script src="../../../../lib/onyx/package.js" type="text/javascript"></script>
	<script src="../../source/wip-package.js" type="text/javascript"></script>
	<!-- -->
	<style>
		body {
			font-family: sans-serif;
		}
		p {
			padding: 8px;
			font-size: 1.2em;
		}
		.box {
			border: 2px solid lightblue;
			padding: 4px;
		}
		.b {
			background-color: #F1FFF1;
		}
		.mtb {
			margin-top: 3px;
			margin-bottom: 3px;
		}
		.mlr {
			margin-left: 6px;
			margin-right: 6px;
		}
		.o {
			border-color: orange;
		}
		.height {
			height: 140px;
		}
	</style>
</head>
<body class="onyx">
<script type="text/javascript">
	
	new (enyo.kind({
		name: "App",
		kind: "FittableRows",
		classes: "box",
		stretch: true,
		components: [
			{content: "FOO<br>FOO", allowHtml: true, classes: "box mtb"},
			{name: "drawer", kind: "onyx.Drawer", components: [
				{content: "Drawer<br>Drawer<br>Drawer<br>Drawer", allowHtml: true, classes: "box mtb"}
			]},
			{content: "FOO<br>FOO", allowHtml: true, classes: "box mtb"},
			{kind: "FittableColumns", fit: true, classes: "box mtb o", ontap: "columnsTap", components: [
				{content: "111111111111111", classes: "box mlr"},
				{name: "columnsDrawer", orient: "h", kind: "onyx.Drawer", open: false, components: [
					{content: "Drawer", classes: "box mlr"},
				]},
				{content: "2", fit: true, classes: "box mlr o"},
				{content: "3333333", classes: "box mlr"}
			]},
			{content: "Bat", classes: "box mtb"}
		],
		tap: function() {
			this.$.drawer.setOpen(!this.$.drawer.open);
		},
		columnsTap: function() {
			this.$.columnsDrawer.setOpen(!this.$.columnsDrawer.open);
			return true;
		}
	}))({fit: true, classes: "enyo-unselectable"}).write();
</script>
</body>
</html>
